#include<iostream>
#include"tcp_server.hpp"
#include"hander.hpp"

void Usage(char* s)
{
  std::cout<<"Usage"<<"\n\t"<<s<<" port"<<std::endl;
}
int main(int argv,char* argc[])
{
  if(argv!=2)
  {
    Usage(argc[0]);
    return 1;
  }
  Tserver::TcpServer* sp=new Tserver::TcpServer(atoi(argc[1]));
  sp->Init();
  sp->Loop(Han::hander4);
  return 0;
}
